<?php
/*
 * estudo de padrões de projetos com php
 * author: fabricio s costa
 * version: 1.0
 * site: http://fabriciojf.com
 */
class ActionFactory {
    public static function sendAction($action) {
        if (($action != null) and ($action != "")) {            
            require_once('com/fabriciojf/action/'.$action.'Action.class.php');
            // funciona como generics, abre qualquer classe
            $className = $action."Action";
            $obj = new $className();
            $obj->execute();
        }
    }    
}

?>
